spinner: Remove unneeded checks
authorBenjamin Otte <otte@redhat.com>
Wed, 30 Apr 2014 06:35:24 +0000 (08:35 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 1 May 2014 12:51:27 +0000 (14:51 +0200)
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.

gtk/gtkspinner.c

index 77f6e9a22cd8560c5d250d6c3ec72b6918d35ccd..86c4e1a5c991613844d2ef4db38b7d0d64f75248 100644 (file)
@@ -34,6 +34,7 @@
 #include "gtkimage.h"
 #include "gtkintl.h"
 #include "gtkstylecontext.h"
+#include "gtkstylecontextprivate.h"
 #include "a11y/gtkspinneraccessible.h"
 
 
@@ -172,11 +173,8 @@ gtk_spinner_get_preferred_width (GtkWidget *widget,
                                  gint      *minimum_size,
                                  gint      *natural_size)
 {
-  if (minimum_size)
-    *minimum_size = SPINNER_SIZE;
-
-  if (natural_size)
-    *natural_size = SPINNER_SIZE;
+  *minimum_size = SPINNER_SIZE;
+  *natural_size = SPINNER_SIZE;
 }
 
 static void
@@ -184,11 +182,8 @@ gtk_spinner_get_preferred_height (GtkWidget *widget,
                                   gint      *minimum_size,
                                   gint      *natural_size)
 {
-  if (minimum_size)
-    *minimum_size = SPINNER_SIZE;
-
-  if (natural_size)
-    *natural_size = SPINNER_SIZE;
+  *minimum_size = SPINNER_SIZE;
+  *natural_size = SPINNER_SIZE;
 }
 
 static gboolean